# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=tracker-miners
pkgver=2.1.5
pkgrel=1
pkgdesc="Collection of data extractors for Tracker/Nepomuk"
url="https://wiki.gnome.org/Projects/Tracker"
arch=(x86_64)
license=(GPL)
depends=(tracker gst-plugins-base-libs exempi flac libexif libcue libgrss libgsf libgxps
         libiptcdata libosinfo libvorbis poppler-glib taglib totem-plparser giflib)
makedepends=(intltool git python meson vala)
groups=(gnome)
_commit=84321f0e1468175c92da92006a2e960fba22a359  # tags/2.1.5^0
source=("git+https://gitlab.gnome.org/GNOME/tracker-miners.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  # Many tests are broken:
  # - Assume schemas are installed
  # - Assume services are autolaunched
  dbus-run-session meson test -C build || :
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
